package club.zbiao.modules.system.domain;

import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @author jie
 * @date 2019-04-10
 */
@Entity
@Data
@Table(name = "sys_dict")
public class Dict extends BaseEntity {

    /**
     * 字典名称
     */
    @Column(name = "name", nullable = false, unique = true)
    @NotBlank
    private String name;

    @OneToMany(mappedBy = "dict", cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
    private List<DictDetail> dictDetails;


}